using CLELCore.Collections;

namespace CLELCore.Assembly
{
	public class GUIDStream
	{
		private Heap _guids;

		public int Size
		{
			get
			{
				return _guids.Size;
			}
		}

		public GUIDStream()
		{
			_guids = new Heap();
		}

		public int Add(byte [] guid)
		{
			int off = _guids.Malloc(guid.Length);
			_guids.Set(off,guid);
			return off;
		}

		public void Free(int off)
		{
			_guids.Free(off);
		}

		public int[][] Compress()
		{
			return _guids.Compress();
		}

		public byte[] Get(int off)
		{
			return _guids.Get(off);
		}
	}
}
